<jsp:useBean id="sendbean" class="dasregistry.sendMailToFriendBean"
	scope="session" />
<jsp:directive.page import="org.biojava.dasobert.dasregistry.DasSource" />
<jsp:directive.page import="org.biojava.dasobert.dasregistry.Das1Source" />
<jsp:directive.page
	import="org.biojava.dasobert.dasregistry.DasCoordinateSystem" />
<jsp:directive.page import="org.biojava.services.das.registry.DasClient" />
<jsp:directive.page import="dasregistry.dasClientLink" />
<jsp:directive.page import="java.lang.Integer" />
<jsp:directive.page import="java.util.Date" />
<jsp:directive.page import="java.util.Map" />
<jsp:directive.page import="java.text.SimpleDateFormat" />
<jsp:directive.page import="dasregistry.ActivationURLCreator" />
<jsp:directive.page import="org.biojava.services.das.registry.AutoActivation" />
<jsp:directive.page import="org.biojava.services.das.registry.DasClient"/>

<%
	// fetch by auto id
	String auto_id = request.getParameter("auto_id");
	DasSource ds = sendbean.getDasSource(auto_id);
	if (ds == null) {
		ds = new Das1Source();
	}

	ActivationURLCreator activCreator = new ActivationURLCreator();

	String title = "send to friend";
	String header = "Send to friend";
%>


<%@ include file="sangerheader.jsp"%>

<div id="main">

<h2>send email</h2>

<%
	String message = request.getParameter("message");
	if (message != null) {
%> <%@ include file="sangertablestart.jsp"%>


<tr>
	<td><b><%=message%></b></td>
</tr>

<%@ include file="sangertableend.jsp"%>
<p />
<%
}
%>

<form action="sendToFriendAction.jsp"><input type="hidden"
	name="auto_id" value="<%=auto_id%>"> <%@ include
	file="sangertablestart.jsp"%>

<tr class="row1">
	<td>&nbsp;</td>
	<td>all fields are mandatory</td>
</tr>

<tr>
	<td NOWRAP>send email to:</td>
	<td><input type="text" name="sendTo"
		value="<%=sendbean.getSendTo()%>" /></td>
</tr>

<tr>
	<td>your email:</td>
	<td><input type="text" name="myEmail"
		value="<%=sendbean.getMyEmail()%>" /></td>
</tr>
<tr>
	<td>subject:</td>
	<td>info about das-source <%=ds.getNickname()%></td>

</tr>

<tr>
	<td>body:</td>
	<td><pre>
<%=sendbean.createMessageBody(ds,auto_id)%>
</pre>

</td>
</tr>


<tr>
	<td colspan="2"><input type="submit" value="send email" /></td>
</tr>
<%@ include file="sangertableend.jsp"%>

</form>


<%@ include file="sangerfooter.jsp"%>


